{
 open Parser
}

let carattere = ['a'-'z' 'A'-'Z' '0'-'9' '#' '_' '-']

rule token = parse

eof			{EOL}
|['\t' ' ' '\n']	{token lexbuf}
|"empty"		{EMPTY}
|"sequence"		{SEQUENCE}
|"repeat"               {REPEAT}
|"while"		{WHILE}
|"if"			{IF}
|"flow"			{FLOW}
|"pick"			{PICK}
|"?<"(carattere* as s)'>'	{ AZIONE("?" ^ s)}
|"!<"(carattere* as s)'>'	{ AZIONE("!" ^ s)}
|'{'			{OPENGRAF}
|'}'			{CLOSEGRAF}
|_	{Printf.printf "Carattere '%s' non riconosciuto\n" (Lexing.lexeme lexbuf); token lexbuf}
